// const { SyncHook } = require('tapable')
let SyncHook = require('./SyncHook.js')

let hook = new SyncHook(['name', 'age'])

hook.tap('fn1', (name,age) => {
    console.log('fn1 ====> ', name, age);
})

hook.tap('fn2', (name,age) => {
    console.log('fn2 ====> ', name, age);
})


hook.call('zz1z', 1010)


/** 
 * 01  实例化hook， 定义_x = [f1,f2,...] taps = [{},{}]
 * 02  实例调用 tap taps = [{},{}]
 * 03  调用call方法，HookCodeFactory setup create
 * 04  Hook SyncHook HookCodeFactory
*/